﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace WpfImageDuplicates
{
    /// <summary>
    /// Interaction logic for FullImageView.xaml
    /// </summary>
    public partial class CommandBar : UserControl
    {
        public event EventHandler WantViewFullImage;
        public event EventHandler WantCompare;
        public event EventHandler WantRemoveDuplicates;

        public CommandBar()
        {
            InitializeComponent();
        }

        protected void OnWantRemoveDuplicates()
        {
            if (WantRemoveDuplicates != null)
                WantRemoveDuplicates(this, EventArgs.Empty);
        }

        protected void OnWantViewFullImage()
        {
            if (WantViewFullImage != null)
                WantViewFullImage(this, EventArgs.Empty);
        }

        private void Button1_Click(object sender, RoutedEventArgs e)
        {
            OnWantViewFullImage();
        }

        private void Button2_Click(object sender, RoutedEventArgs e)
        {
            OnWantRemoveDuplicates();
        }

        private void Button3_Click(object sender, RoutedEventArgs e)
        {
            if (WantCompare != null)
                WantCompare(this, EventArgs.Empty);
        }
    }
}
